<template>
  <div style="width: 100%; height: 100vh; background: #414141;">
    <mt-header fixed :title="$t('mingxi.name')" style="background:#1d1d1d;color:#fff;">
      <div slot="left">
        <router-link to="" slot="left" style="text-decoration: none;color: #fff;">
          <mt-button @click="$router.back(-1)" icon="back"></mt-button>
          </router-link>
      </div>
    </mt-header>
    <div style="width: 100%;height:.95rem;"></div>
    <div>
      <div class="mingxi_list" style="">
        <span>{{$t('currency')}}</span>
        <span>{{$t('dollor')}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.current_benefit')}}</span>
        <span>{{parseFloat(userinfo.money_zong|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('usable')}}</span>
        <span>{{parseFloat(userinfo.money_ke|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.profit_loss')}}</span>
        <span>{{parseFloat(userinfo.order_out|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.deposit')}}</span>
        <span>{{parseFloat(userinfo.deposit|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.freeze_deposit')}}</span>
        <span>{{parseFloat(userinfo.deposit|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.available')}}</span>
        <span>{{parseFloat(userinfo.money_qu|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.wind_efficiency')}}</span>
        <span>{{userinfo.riskrate||0}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.freeze_server_charge')}}</span>
        <span>{{parseFloat(userinfo.service_fee_no|| 0).toFixed(2)}}</span>
      </div>
      <div class="mingxi_list" style="">
        <span>{{$t('mingxi.amount_of_current')}}</span>
        <span>{{parseFloat(userinfo.money || 0).toFixed(2)}}</span>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        userinfo: {},
      };
    },
    mounted() {
      this.capital()
    },
    computed: {
      // initState() {
      // this.userinfo = this.$store.state.user;
      // }
    },
    watch: {
      initState() {}
    },
    methods: {
      capital() {
        this.$get('addons/tf-futures/member/my-info').then(res => {
          if (res.code == 200) {
            this.userinfo = res.data
            setTimeout(() => {
              this.capital()
            }, 1500);
          }
        });
      },
    }
  };
</script>


<style scoped>
  .mingxi_list {
    width: 100%;
    height: 1.2rem;
    background: #414141;
    color: #FFA500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 .5rem;
    box-sizing: border-box;
    font-size: .35rem;

  }
</style>
